﻿using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Baseball.Infrastructure
{
    public static class UIManager
    {
        public static void GenerateIndicator(this PhoneApplicationPage Page, string Message)
        {
            ProgressIndicator Indicator = new ProgressIndicator
            {
                Text = Message,
                IsIndeterminate = true,
                IsVisible = true
            };

            SystemTray.SetProgressIndicator(Page, Indicator);
        }

        public static void HideIndicator(this PhoneApplicationPage Page)
        {
            SystemTray.SetProgressIndicator(Page, null);
        }
    }
}
